package com.lehecai.ucenter.servlet.monitor;

import java.io.Serializable;

/**
 * @author likunpeng on 2014/6/10.
 * 系统监控接口消息类型
 */
public class MonitorMessage implements Serializable {
    private static final long serialVersionUID = -621174357884045707L;

    protected String errorCode;
    protected String message;
    protected String status;

    protected MonitorMessage(String errorCode, String message, String status) {
        this.errorCode = errorCode;
        this.message = message;
        this.status = status;
	}

	public final static MonitorMessage OK = new MonitorMessage(ErrorCode.OK,"系统正常","ok");
	public final static MonitorMessage SYSTEM_ERROR = new MonitorMessage(ErrorCode.SYSTEM_ERROR,"系统异常", "system error");
    public final static MonitorMessage THREAD_ERROR = new MonitorMessage(ErrorCode.THREAD_ERROR,"子线程异常", "thread error");
    public final static MonitorMessage TIMEOUT_ERROR = new MonitorMessage(ErrorCode.TIMEOUT_ERROR,"请求超时", "timeout error");
    public final static MonitorMessage DB_CONNECTION_ERROR = new MonitorMessage(ErrorCode.DB_CONNECTION_ERROR, "数据库连接异常", "db connection error");
    public final static MonitorMessage CACHE_CONNECTION_ERROR = new MonitorMessage(ErrorCode.CACHE_CONNECTION_ERROR,"缓存服务连接异常", "cache connection error");
    public final static MonitorMessage API_REQUEST_ERROR = new MonitorMessage(ErrorCode.API_REQUEST_ERROR,"api请求异常", "api request error");
}
